package com.itboye.zhujia.me;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.ToggleButton;

import com.itboye.zhujia.R;
import com.itboye.zhujia.base.BaseActivity;
import com.itboye.zhujia.controller.LoginController;
import com.itboye.zhujia.controller.UnLoginState;
import com.itboye.zhujia.util.SPUtils;
/**
 * 设置
 *
 */
public class ActivitySetting extends BaseActivity implements OnClickListener{
	ImageView close_icon;
	TextView add_shap_title_tv;
	ToggleButton toggle_button;//切换按钮
	RelativeLayout seting_feed;// 反馈
	RelativeLayout seting_move;// 关于
	TextView seting_ok;// 退出
	public static String EXITCHANGE = "com.itboye.zhujia.person.exit";
	@Override
	public int initView() {
		return 0;
	}

	@Override
	public void onMyCreate() {
		setContentView(R.layout.activity_setting);
		add_shap_title_tv.setText("设置");
		
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.close_icon:
			finish();
			break;
		case R.id.seting_feed:// 反馈
			break;
		case R.id.seting_move:// 关于
			break;
		case R.id.seting_ok:// 退出
			exit();
			break;
		default:
			break;
		}
		
	}
	public void exit() {
		SPUtils.clear(ActivitySetting.this, "share_by_data");
		LoginController.setLoginState(new UnLoginState());
		
		Intent intent1 = new Intent(EXITCHANGE);
		sendBroadcast(intent1);
		ActivitySetting.this.finish();

	}
}
